package com.quantdo.qtm.interfaces.common;

public class QuantdoResponse<T> {
    private int code;
    private String massage;
    private T result;
    
    public static <T> QuantdoResponse<T> success(T t) {
        return new QuantdoResponse<>(ResultCodeEnum.SUCCESS.getCode(),null,t);
    }

    QuantdoResponse(int code, String massage, T t){
        this.code = code;
        this.massage = massage;
        this.result = t;
    }

    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
    public String getMassage() {
        return massage;
    }
    public void setMassage(String massage) {
        this.massage = massage;
    }
    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }
}
